<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">

	</head>
	<body style="padding: 0px;">
		<div class="easyui-layout" style="width:101%;height:600px;">
			<div id="div_search" data-options="region:'north'" style="height:80px;">
				
			</div>
			<div data-options="region:'center'" title="短信发送情况">
				<div>
					<table id="dg" class="table_style">
					</table>
				</div>
			</div>
		</div>
		<div id="toolbar"></div>
		<div id="dlg" class="easyui-dialog" closed="true" style="width:815px;height:350px;">
			<iframe id="ifrmEdit" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>
		</div>
	</body>
	<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
	<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../../JS/common.js"></script>
	<script type="text/javascript" src='../../../JS/MarketShareFunction/SMSShareFunction.js'></script>
	<script type="text/javascript" src="../../../JS/MarketShareFunction/SMSSearchShareFunction.js"></script>
	<script>
		var content = "";
		var toolbarType=TOOLBAR_REDO;
		content = AddToolBar(toolbarType);
		$("#toolbar").append(content);
		function redodata(){
			checkAllData("/phonesms/list.do");
		}
		$('#dg').datagrid({
			url: RemoteLinkAddress + '/phonesms/list.do',//此处2,3为检索即时短信和群发短信
			toolbar: '#toolbar',
			method: 'get',
			pagination: 'true',
			rownumbers: 'true',
			autoRowHeight: 'true',
			fitColumns: 'false',
			singleSelect: 'true',
			height: 350,
			columns: [
				[{
					field: 'ID',
					title: 'ID',
					width: '10%',
					align: 'center'
				}, 
				{
					field: 'TYPE',
					title: '类型',
					width: '10%',
					align: 'center',
					formatter: function(value, row, index) {
						return SMSTypeChange(value);
					}
				},
				{
					field: 'PHONE',
					title: '电话号码',
					width: '50%',
					align: 'center'
				}, 
				{
					field: 'SENDDATE',
					title: '发送时间',
					width: '10%',
					align: 'center'
				},
				{
					field: 'SHOULDSEND',
					title: '应该发送',
					width: '8%',
					align: 'center',
					formatter: function(value, row, index) {
						return value+"条";
					}
				},{
					field: 'SENDED',
					title: '已经发送',
					width: '8%',
					align: 'center',
					formatter: function(value, row, index) {
						return value+"条";
					}
				}, 
				]
			],
		});
		
		var searchType = SEARCH_SMS_SENDDATE_START+SEARCH_SMS_SENDDATE_END+SEARCH_SMS_SEND_TYPE;
		var content = buildSearchOptions(searchType,"");
		$("#div_search").append(content);
		function doSearch() {
			var searchCondition = "";
			searchCondition = processSearchCondition();
			console.log(searchCondition);
			var _url = RemoteLinkAddress + '/phonesms/list.do?' + searchCondition;
			$('#dg').datagrid('options').url = _url;
			$('#dg').datagrid('reload');
		}
	</script>

</html>